﻿@model Order
           @using KhoaLuan.Resources.Cart
@{
    ViewBag.Title = "OrderDetail";
}
<h3>@Cart.ChiTietDonHang</h3>
<div class="row" style="border-color: #00ff90; border: double; ">
    <div class="col-md-8">

        <ul>
            <li>STT: @Model.Id</li>
            <li>@Cart.KhachHang: @Model.Customer.Fullname</li>
            <li>@Cart.NgayDatHang: @Model.OrderDate</li>
            <li>@Cart.NgayNhanHang: @Model.RequireDate</li>
            <li>@Cart.NguoiNhanHang: @Model.Receiver</li>
            <li>@Cart.DiaChiNhanHang: @Model.Address</li>
            <li>@Cart.TongSoTien: @Model.Amount</li>
            <li>@Cart.GhiChu: @Model.Description</li>

        </ul>
    </div>
    <div class="col-md-4">
        <img style="margin-top:80px;" src="~/images/chuathanhtoan.jpg" />
        <a class="btn btn-danger"  href="@Url.Action("ExportPDF", "Order")">In Đơn Hàng</a>
    </div>

</div>

<fieldset>
    <legend></legend>
    <table class="table table-hover">
        <tr>
            <th>@Cart.Name</th>
            <th>@Cart.DonGia</th>
            <th>@Cart.SoLuong</th>
            <th>@Cart.GiamGia</th>
            <th>@Cart.Sotien</th>
        </tr>
        @foreach (var d in Model.OrderDetails)
        {
            <tr>
                <td>@d.Product.Name</td>
                <td>@d.UnitPrice</td>
                <td>@d.Quantity</td>
                <td>@d.Discount</td>
                <td>@(d.UnitPrice * d.Quantity * (1 - d.Discount))</td>
            </tr>
        }
    </table>
</fieldset>


